const menuOptions = document.querySelector('#menuOptions')
const container = document.querySelector('.container')
function openMenu() {
    menuOptions.style.left = 0
}

//当点击的不为菜单时，关闭菜单
window.onclick = function (event) {
    if (event.target == menuOptions || event.target == container) {
        console.log(event.target);
        closeMenu();
    }
}
function closeMenu() {
    menuOptions.style.left = '-100%'
}